<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	protected function _initDb()
    {
        // Setup database
        $db = Zend_Db::factory('Pdo_Mysql', $this->getOption('db'));
        $db->setFetchMode(Zend_Db::FETCH_ASSOC);
//        $db->query("SET NAMES 'utf8'");
//        $db->query("SET CHARACTER SET 'utf8'");
       
        Zend_Registry::set('DB',$db);
        //Khi thiet lap che do nay model moi co the su dung duoc
        Zend_Db_Table::setDefaultAdapter($db);
        // Return it, so that it can be stored by the bootstrap
        return $db;
    }
	protected function _initStartSession()
	{
		Zend_Session::start();
	}    
	protected function _initLocalTime()
	{
		date_default_timezone_set('Asia/Saigon');
		$locate = Zend_Locale::setDefault("vi_VN");
		Zend_Registry::set("locate",$locate);
	}
	
}

